<!--客户定位tab切换组件-->
<template>
  <div style="height: 100%; overflow: hidden">
    <el-breadcrumb class="ne-padding-t-10" separator="/">
      <el-breadcrumb-item>首页</el-breadcrumb-item>
      <el-breadcrumb-item>已改单销售品列表</el-breadcrumb-item>
    </el-breadcrumb>
    <div class="app-container m-content-box">
      <step-nav
        style="margin-bottom: 0.1rem"
        justify="center"
        :active="stepNav2.active"
        :colSize="10"
        :step-data="stepNav2.stepData"
      ></step-nav>
      <div class="order-list-box">
        <div class="contain">
          <transition name="fade" mode="out-in">
            <keep-alive>
              <component
                v-bind:is="whichComp"
                :customerOrder="customerOrder"
              ></component>
            </keep-alive>
          </transition>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import saleCase from "@/components/order/SaleCase";
import ChangeOrder from "@/components/order/ChangeOrder";
import { mapState } from "vuex";
import StepNav from "@/components/public/StepNav";
export default {
  name: "ContinueChange",
  data() {
    return {
      whichComp: "ChangeOrder",
      customerOrder:{}
    };
  },
  props: {},
  mounted() {
    this.customerOrder = JSON.parse(sessionStorage.getItem("bgCustomerOrder"));
    if (
      JSON.parse(sessionStorage.getItem("ppmCondition")).modType == "50200002"
    ) {
      //非正常变更50200002，调用改单订单项列表
      this.whichComp = "ChangeOrder";
    }
    if (
      JSON.parse(sessionStorage.getItem("ppmCondition")).modType == "50200003"
    ) {
      //非正常变更50200003，调用改单销售品实例
      this.whichComp = "saleCase";
    }
  },
  created() {},
  components: {
    ChangeOrder,
    saleCase,
    StepNav,
  },
  computed: {
    ...mapState("orders", ["stepNav2"]),
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.order-list-box {
  ::v-deep .ne-line {
    margin: 0 !important;
  }
  .contain {
    padding: 0.2rem 0rem;
    height: calc(100vh - 3rem);
    overflow-y: auto;
  }
  .tagsbox {
    margin: 0.1rem 0.3rem 0 0.1rem;
  }
}
</style>
